|
|
|
|
|
|
|
Adding the About Box to Your Application |
|
|
|
|
|
|
|
|
Create a new procedure by selecting Insert | Procedure and entering the following code: |
|
|
|
|
|
|
|
|
Sub WinAboutPage (frm As Form)
Dim MoreInfo$
'
MoreInfo$ = "Copyright " + Chr$(169) + " 1994 Software Company, Inc."
MoreInfo$ = MoreInfo$ + Chr$(13) + "Technical Support: 800-555-7777"
'
Call ShellAbout(frm.hWnd, app.Title, MoreInfo$, frm.Icon)
End Sub |
|
|
|
|
|
|
|
|
Entering Code in the Menu Events |
|
|
|
|
|
|
|
|
First, enter the following code in the mnuContents_Click event: |
|
|
|
|
|
|
|
|
Private Sub mnuContents_Click ()
Helpfile Me, Help_index
End Sub |
|
|
|
|
|
|
|
|
Second, enter the following code in the mnuSearch_Click event: |
|
|
|
|
|
|
|
|
Private Sub mnuSearch_Click ()
HelpFile Me, Help_PartialKey
End Sub |
|
|
|
|
|
|
|
|
Third, enter the following code in the mnuHelponHelp_Click event: |
|
|
|
|
|
|
|
|
Private Sub mnuHelponHelp_Click ()
HelpFile Me, Help_HelponHelp
End Sub |
|
|
|
|
|
|
|
|
Fourth, enter the following code in the mnuAbout_Click event: |
|
|
|
|
|
|
|
|
Private Sub mnuAbout_Click ()
WinAboutPage Me
End Sub |
|
|
|
|
|
|
|
|
Fifth, enter the following code inside the mnuExit_Click event: |
|
|
|
|
|
|
|
|
Private Sub mnuExit_Click()
Unload Me
End Sub |
|
|
|
|
|
|
|
|
And finally, enter the following code inside the Unload event for your form: |
|
|
|
|
|
|
|
|
Private Sub Form_Unload (Cancel As Integer)
HelpFile Me, Help_Quit
End Sub |
|
|
|
|
|
|
|
|
Save your form and project. Run the project and select each of the menu items. Notice that Help | Contents displays the Contents page of the help file you created earlier today and declared in the Form_Load event. Selecting Help | Search displays a listing of topics from the same help file. The menu selection Help | Help on Help displays a screen similar to |
|
|
|
|
|